import os
import csv
from tkinter import messagebox
def create_csv(text_data, folder_path, csv_filename):
    """Create CSV file and write data in the folder selected by the user"""
    full_path = os.path.join(folder_path, csv_filename)
    """Combine the folder path and file name into a complete file path."""
    with open(full_path, mode='w', newline='', encoding='utf-8') as file:
        writer = csv.writer(file)
        """Create a CSV writer object"""
        writer.writerows(text_data)
        """Return a CSV writer object"""
    messagebox.showwarning("Tip", "Upload successfully!")